<template>
    <div class="speaker">
        <div class="speaker-content">
            <image class="home-title" id="speakers" src="https://static.inclusionconf.com/static/images/speakers-title-now3-2025.png" alt="" mode="heightFix">
            <div class="list">
                <div class="item" v-for="(item, index) in list" :key="index">
                    <div class="img"><image class="img1" :src="item.photoImgUrl" alt="" mode="aspectFill"></div>
                    <div class="name">{{ item['name' + En] }}</div>
                    <div class="text" :class="isPc ? 'ellipsis2' : ''" v-html="item['position' + En]"></div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>

export default {
    props: {
        list: {
            type: Array,
            default() {
                return []
            }
        }
    },
    data() {
        return {
        }
    },
}
</script>

<style lang="scss" scoped>
@media screen and (min-width: 768px) {
    .speaker {
        background: url(https://static.inclusionconf.com/static/images/home-speaker-bg.png) no-repeat;
        background-position: left bottom;
        background-size: 100% auto;
        background-color: #FCFCFF;
        position: relative;

        &::before {
            content: "";
            position: absolute;
            background: #19234B;
            width: 100%;
            height: calc(100% - 100px);
            left: 0;
            top: 0;
        }

        .speaker-content {
            max-width: 1360px;
            padding: 0 40px 121px;
            margin: 0 auto;
            position: relative;
            z-index: 1;

            .list {
                display: flex;
                flex-wrap: wrap;
                margin-top: 9px;

                .item {
                    flex: 0 0 calc(20% - 12px);
                    margin-right: 15px;
                    padding: 16px 18px 12px;
                    margin-top: 19px;
                    outline: 1px solid rgba(255, 255, 255, 0.20);
                    position: relative;

                    &:nth-child(5n) {
                        margin-right: 0;
                    }

                    .img {
                        overflow: hidden;
                    }

                    img {
                        width: 100%;
                        height: auto;
                        position: relative;
                        z-index: 1;
                        transition: .3s linear;

                        &:hover {
                            transform: scale(1.04);
                        }
                    }

                    .name {
                        font-family: AlibabaPuHuiTi_3_85_Bold;
                        font-size: 20px;
                        color: #FFFFFF;
                        line-height: 20px;
                        text-align: center;
                        font-style: normal;
                        margin: 16px 0 8px;
                        position: relative;
                        z-index: 1;
                    }

                    .text {
                        font-family: AlibabaPuHuiTi_3_45_Light;
                        font-size: 14px;
                        color: #ECECF0;
                        line-height: 20px;
                        text-align: center;
                        font-style: normal;
                        height: 40px;
                        position: relative;
                        z-index: 1;
                    }

                    // &::before {
                    //     content: "";
                    //     position: absolute;
                    //     left: -2px;
                    //     top: -2px;
                    //     right: -2px;
                    //     bottom: -2px;
                    //     opacity: 0;
                    //     border-radius: 12px;
                    //     transition: .3s linear;
                    //     background: linear-gradient( 45deg, RGBA(18, 85, 234, 1) 0%, RGBA(207, 39, 145, 1) 100%);
                    // }

                    // &:after {
                    //     content: "";
                    //     position: absolute;
                    //     left: 0;
                    //     top: 0;
                    //     width: 100%;
                    //     height: 100%;
                    //     opacity: 0;
                    //     border-radius: 12px;
                    //     transition: .3s linear;
                    //     background: linear-gradient( 45deg, RGBA(36, 81, 226, 1) 0%, RGBA(32, 32, 42, 1) 40%, RGBA(148, 48, 165, 1) 100%);
                    // }
                    // &:hover::after, &:hover::before {
                    //     opacity: 1;
                    // }
                }
            }
        }
    }
}

@media screen and (max-width: 767px) {
    .speaker {
        background: url(https://static.inclusionconf.com/static/images/home-speaker-bg.png) no-repeat;
        background-position: left bottom;
        background-size: 100% auto;
        background-color: #FCFCFF;
        position: relative;
		padding-top: 40rpx;

        &::before {
            content: "";
            position: absolute;
            background: #19234B;
            width: 100%;
            height: calc(100% - 100px);
            left: 0;
            top: 0;
        }

        .speaker-content {
            max-width: 100%;
            padding: 0 18px 64rpx;
            margin: 0 auto;
            position: relative;
            z-index: 1;

            .list {
                display: flex;
                flex-wrap: wrap;
                padding-top: 48rpx;
                width: calc(100% + 18px);

                .item {
                    flex: 0 0 200rpx;
                    margin-bottom: 36rpx;
                    transition: .5s;
                    margin-right: 38rpx;

                    &:nth-child(3n) {
                        margin-right: 0;
                    }

                    .img {
                        width: 200rpx;
                        height: 200rpx;
						
						.img1 {
							width: 200rpx;
							height: 200rpx;
						}
                    }

                    .name {
                        font-family: AlibabaPuHuiTi_3_85_Bold;
                        font-size: 13px;
                        color: #FFFFFF;
                        line-height: 19px;
                        text-align: center;
                        font-style: normal;
                        margin: 7px 0 4px;
                    }

                    .text {
                        font-family: AlibabaPuHuiTi_3_45_Light;
                        font-size: 10px;
                        color: #ECECF0;
                        line-height: 1.4;
                        text-align: center;
                        font-style: normal;
                    }
                }
            }
        }
    }
}
</style>
